<?php
	$css_list[0]['url'] = './tpl/css/imagewall.css';
	$css_list[1]['url'] = './tpl/css/album.css';
	$js_list[0] = './tpl/js/album.js';
    $js_list[1] = './tpl/js/im_004.js';
?>
<!--{template inc/header}-->
<div id="content">
	<div class="sharelist" id="zhimeisheetbar">
    	<div class="sheet cf">	
		<div class="floatright">
			<span>
				共<em id="shareNum">{$home_user['shares']}</em>个分享
			</span>
            <span class="sheetbt">
            <!--{if $_FANWE['uid'] == $home_uid}-->
            	<a id="edit" class="winbtn addin" href="javascript:void(0)" onclick="$.Edit_Album({$album['id']})">编辑</a></span>
            <!--{elseif $is_show_follow}-->
            	<a class="winbtn addin" href="javascript:void(0)" onclick="$.User_Follow({$home_uid},this,UpdateUserFollow)" >关注</a></span>
            <!--{else}-->
                <a  onclick="$.User_Follow({$home_uid},this,UpdateUserFollow)" class="winbtn unaddin" href="javascript:void(0)" style="display: inline-block; ">已关注</a>
            <!--{/if}-->
		</div>
		<a class="sheetname blue" href="{u u/index uid=$home_uid}" id="fix-string03">{$home_user['user_name']}</a>
		<span class="pointleft">
		</span>
        <span class="sheetname" id="fix-string04">{$album['title']}</span>
        </div>
	</div>
    <div style="clear:both"></div>
    <div id="contentMain" class="content" style="position:relative; margin-top:16px;">
    	<div id="rightLabel1" class="rightbox bgwhite" style="margin-top:-75px; background-color:#FFF; right:0px;">
        	<div id="myinfo">
            	<div class="topline userbox cf">
					<h3 class="title"><span class="label">创建者</span> </h3>
					<div class="uhead" style="height:60px;">
						<a href="{u u/index uid=$home_uid}">
                        <img src="{avatar $home_uid m 1}" title="{$home_user['user_name']}" width="60" height="60">
                        </a>
					</div>
					<div class="uinfo">
						<p>
							<a class="blue arial b" href="{u u/index uid=$home_uid}">{cutstr $home_user['user_name'] 15}</a>
						</p>
					</div>
				</div>
                <div class="labelbox userbox">
					<h3 class="title">
						<span class="label">
                        <!--{if $_FANWE['uid'] == $home_uid}-->
                        我
                        <!--{elseif $home_user['gender'] == 1}-->
                        他
                        <!--{else}-->
                        她
                        <!--{/if}-->
                        的其他图格</span>
					</h3>
					<ul class="taport" id="jqury-textdecoration">
                    	<!--{eval $indx = 1;}-->
						<!--{loop $album_list $album}-->
						<li class="cf">
                        	<a class="blue" href="{u album/show id=$album['id']}" title="{$album['title']}">
                            	<span class="floatright gray">{$album['share_count']}张</span>
								{cutstr $album['title'] 20}
							</a>
                        </li>
                        <!--{/loop}-->
					</ul>
				</div>
            </div>
        </div>
         <!--预加载数据-->
    <!--{loop $list $share}-->
    <div class="imBoard rightbox" dataid = "{$share['share_id']}">
    	<div class="pin">
        	<div class="modify">
            	<div class="actions" style="display: none; ">
                	<a haref="javascript:;" onclick="$.Relay_Share({$share['share_id']})" class="button forward-btn png">转发</a>
                    <a class="button comment-btn png">评论</a>
                    <!--{if $share['isMe']}-->
                    	<a href="javascript:;" class="button edit-btn png" onclick="$.Edit_Share({$share['share_id']})">编辑</a>
                    <!--{elseif $share['likeStatus']}-->
                    	<a  parent_id = {$share['parent_id']} share_id = {$share['share_id']} size=32  class="button favourite-btn unfavourite-btn">取消</a>
                    <!--{else}-->
                    	<a  parent_id = {$share['parent_id']} share_id = {$share['share_id']} size=32  class="button favourite-btn png">喜欢</a>
                    <!--{/if}-->
                    
                </div>
                <div class="show-img" style="height:{$share['height']}px;">
                	<a href="{$share['share_url']}" target="_blank">
                    	<img class="picUrl" height="{$share['height']}" src="{$share['share_img']}" width="190">
                    </a>
                </div>
                <div class="title-sign">
                	<p class="contentsms">{$share['content']}</p>
                    <p class="quantity" style="display:{if $share['relay_count'] == 0 && $share['comment_count'] == 0 && $share['collect_count'] == 0} none{/if};">
                    	<span style="display:{if $share['replay_count'] == 0}none;{else}inline-block;{/if}">
                        	<span>转发</span>
                            <span class="reshareNum">{$share['replay_count']}</span>
                        </span>&nbsp;
            			<span style="{if $share['comment_count'] == 0}display:none;{else}display:inline-block;{/if}">
                        	<span class="pointsNum">·</span>
                            <span>评论</span>
                            <span class="commentNum">{$share['comment_count']}</span>
                        </span>&nbsp;
                        <span style="{if $share['collect_count'] == 0}display:none;{else}display:inline-block;{/if}">
                        	<span class="pointsNum">·</span>
                            <span>喜欢</span>
                            <span class="likeNum">{$share['collect_count']}</span>
                        </span>
                    </p>
              	</div>
                <ul class="comentMain">
                	<li class="hover cf">
                    	<div class="uhead" style="height:30px;">
                        	<a href="{$share['u_url']}">
                            	<img src="{$share['avt']}">
                           	</a>
                       	</div>
                        <div class="uinfo">
                        	<p>
                            	<a href="{$share['u_url']}" class="gray">{$share['user_name']}</a> 
                                {if $share['isOriginal'] == 1}分享到{else}转发到{/if} 
                                <a href="{$share['album_url']}" class="gray">{$share['album_title']}</a>
                           	</p>
                        </div>
                    </li>
                    <!--{if count($share['comments']) > 0}-->
                    	{loop $share['comments'] $comment}
                        	<li class="cf">
                            	<div class="uhead" style="height:30px;">
                        			<a href="{$comment['user_url']}"><img src="{$comment['avt']}" /></a>
                                </div>
                                <div class="uinfo">
                                	<p>
                                    	<a href="{$comment['user_url']}" class="gray">{$comment['user_name']}</a>
                                    </p>
                                    <p class="recoment" commentId="{$comment['comment_id']}">
                                    	{$comment['comment']}&nbsp;<a class="gray">回复</a>
                                    </p>
                                </div>
                            </li>
                        {/loop}
                    <!--{/if}-->
                    
                </ul>
                <div class="postcomment" style="display:none;" parent_id="0">
                	<div class="cf title">
                    	<a href="javascript:void(0)" class="x commentClose">关闭</a>
                        添加评论
                    </div>
                    <div class="cf">
                    	<div class="uhead" style="height:30px;">
                        	<a href="{$current_user['u_url']}"><img src="{$current_user['avt']}"></a>
                       	</div>
                        <div class="commentbody">
                        	<span class="innerborder">
                            	<textarea class="commentTextarea" maxlength="140"></textarea>
                            </span>
                            <div class="submit cf">
                            	<span class="floatright count">
                                	<em class="lightblue">0</em>/140
                                </span>
                                <a class="unpincomment" href="javascript:void(0);">提交</a>
                            </div>
                       </div>
                  	</div>
              	</div>
           	</div>
      	</div>
    </div>  
    <!--{/loop}-->
        
    </div>
    <div id="imloading" class="imfootloading" style="display:none;"><div class="loading">正在加载，请稍后......</div></div>
	<div id="firstload" class="firstload" style="display:none;">加载中…</div>
</div>

<script>
jQuery(function($){
$("#contentMain .imBoard").hover(function(){
					$(this).find(".modify").addClass("modifyhover");
					$(this).find(".actions").show();
					$(this).find(".comentMain").find(".uinfo").find("a").removeClass().addClass("blue");
				},function(){
					$(this).find(".modify").removeClass("modifyhover");
					$(this).find(".actions").hide();
					$(this).find(".uinfo").find("a").removeClass().addClass("gray");
				});
var linkUrl = '{$link_url}',jsonUrl = '{$json_url}';
linkUrl = linkUrl +"&v=" +Math.random()*99999999;
autoLayout.init({
contentID:"contentMain",
rightLoad:true,
leftID:[],
rightID:["rightLabel1"],
linkUrl:linkUrl,
pageAuto: true,
loadingID:"imloading"
});
autoLayout.eachAction(jsonUrl);
});

function UpdateUserFollow(obj,result)
{
	if(result.status == 1)
	{
		
		$(obj).removeClass("addin").addClass("unaddin").html("已关注");
	}
	else
	{
		$(obj).removeClass("unaddin").addClass("addin").html("关注");
	}
	
}

</script>
<!--{template inc/footer}-->
